Run Your Fleet Customer Contract Import
Introduction
This will import Run Your Fleet vehicles in to ViSN, and allocate vehicles to sub-customers using the Customer Account Number field
download sample Run Your Fleet customer contract import file.
File format
Comma Separated Values - *.csv
Encoding - UTF-8
Run Your Fleet Customer Customers Import
| Run Your Fleet Customer contract fields | Description | Max length | Data Type | Rules | Mandatory | Default Values | Example |
|---|---|---|---|---|---|---|---|
| Registration | Vehicle Registration number | 10 | String | A-Z & 0-9 Characters | Y | AM10JKL | |
| VIN | Vehicle identification number | 20 | String | A-Z 0-9 and Special Characters | N | WVWZZZ1KZAM10JKL1 | |
| Asset Number | Asset Number | 10 | String | A-Z & 0-9 | N | ASSET003 | |
| Registration Date | Registration Date | NA | Number | DDMMYYYY | N | 15062023 | |
| Make | Make of the vehicle | 50 | String | A-Z 0-9 and Special Characters | N | Volkswagen | |
| Model | Model of the vehicle | 50 | String | A-Z 0-9 and Special Characters | N | Golf | |
| Specification | Specification | 100 | String | A-Z 0-9 and Special Characters | N | Match | |
| Fuel Type | Fuel type of vehicle | 50 | String | A-Z 0-9 and Special Characters | N | Diesel | |
| Vehicle Type | Type of vehicle | 10 | String | A-Z 0-9 and Special Characters | Y | Valid vehicle types: Car, LCV, Van, Commercial (under 3.5), Commercial (over 3.5), HGV, Motor Bike, Electric Car | |
| Contract Start Date | Start date of contract | NA | Number | DDMMYYYY | N | 15062023 | |
| Contract End Date | End date of contract | NA | Number | DDMMYYYY | N | 15062026 | |
| Contract Mileage Term | Mileage of Vehicle | 6 | Number | 0-9 | N | 20000 | |
| CAPID | Cap Id | 20 | String | A-Z 0-9 and Special Characters | N | CAPID003 | |
| Argic Code | Argic Code | 20 | String | A-Z 0-9 and Special Characters | N | ARGIC03 | |
| Colour | Colour of Vehicle | 200 | String | A-Z 0-9 and Special Characters | N | Grey | |
| MOT Due Date | Last date for MOT | NA | Number | DDMMYYYY | N | 15062027 | |
| Maintained | Only "Maintained" vehicles are imported, if the value is other than Y, then it is ignored and a log is added | NA | String | Y or N | Y | Y | |
| Vehicle Product | Vehicle Product | 50 | String | A-Z 0-9 and Special Characters | N | Fleet Managed | |
| Service Schedule | Service Schedule | 8 | Number | 0-9 | N | 24000 | |
| Warranty Parameter Months | Warranty parameter months | 3 | Number | 0-9 | N | 48 | |
| Warranty Parameter Mileage | Warranty mileage | 6 | Number | 0-9 | N | 85000 | |
| Fridge | Fridge | NA | String | Y or N | N | N | N |
| Tail Lift | Tail Lift | NA | String | Y or N | N | N | N |
| Crane | Crane | NA | String | Y or N | N | N | N |
| Customer Name | Customer Name | 100 | String | a-z A-Z 0-9 and Special Characters | N | Ford cust | |
| Customer Account Number | Customer Account Number used to map or create sub-customers on import | 50 | String | A-Z 0-9 and Special Characters | N | 00123456789 | |
| VAT Number | VAT Number | 15 | String | A-Z 0-9 and Special Characters | N | GB987654321 | |
| Address 1 | Building Number | 50 | String | A-Z 0-9 and Special Characters | N | 45 | |
| Address 2 | Street Name | 100 | String | A-Z 0-9 and Special Characters | N | Church Road | |
| Address 3 | District | 50 | String | A-Z 0-9 and Special Characters | N | North | |
| Address 4 | Town | 100 | String | A-Z 0-9 and Special Characters | N | Manchester | |
| Address 5 | County | 50 | String | A-Z 0-9 and Special Characters | N | Greater Manchester | |
| Postcode | Postcode | 15 | String | A-Z & 0-9 | N | M11AA | |
| SMR | SMR | NA | String | Y or N | N | N | Y |
| Tyres | Tyres | NA | String | Y or N | N | N | Y |
| Glass | Glass | NA | String | Y or N | N | N | Y |
| Accident Management | Accident Management | NA | String | Y or N | N | N | N |
| Breakdown | Breakdown | NA | String | Y or N | N | N | Y |
| Insurance | Insurance | NA | String | Y or N | N | N | N |
| Rental | Rental | NA | String | Y or N | N | N | N |
| Cost Centre | Cost Centre | 15 | String | A-Z 0-9 and Special Characters | N | CC003 | |
| Invoice Centre | Invoice Centre | 15 | String | A-Z 0-9 and Special Characters | N | INV003 | |
| Customer Contact | Customer Contact | 15 | Number | 0-9 | N | 07987654321 | |
| Customer Number | Customer Number | 15 | Number | 0-9 | N | 00123456789 | |
| Customer Email | Customer Email | 50 | String | Standard email format | N | ops@example.com | |
| Customer Policy Notes | Customer Policy Notes | 700 | String | A-Z 0-9 and Special Characters | N | Policy notes text | |
| Customer Recharge Limit | Customer Recharge Limit | NA | Number | 0-9 | N | 300 | |
| Customer Referral Limit | Customer Referral Limit | NA | Number | 0-9 | N | 600 | |
| Driver Firstname | Driver first name | 30 | String | A-Z 0-9 and Special Characters | N | Simon | |
| Driver Lastname | Driver Last name | 30 | String | A-Z 0-9 and Special Characters | N | Rouse | |
| Driver Email | Driver Email | 50 | String | Standard email format | N | simon.d@example.com | |
| Driver Number | Driver Number | 11 | Number | 0-9 | N | 07987654321 | |
| Policy Number | Policy Number | 25 | String | A-Z & 0-9 Space, Dash and hyphen | N | POL-RYF003 | |
| Policy Start Date | Policy Start Date | NA | Number | DDMMYYYY | N | 15062023 | |
| Policy End Date | Policy End Date | NA | Number | DDMMYYYY | N | 15062026 | |
| Policy Term | Policy Term | NA | Number | 0-9 | N | 36 | |
| Product Type | Product Type | 20 | String | A-Z 0-9 and Special Characters | N | WR91OJ |
Importing a File
Preparation
- Create a new branch including the Jira task number in the branch name.
- Delete all files in the
importFilesfolder. - Create a folder with the current sprint number.
- Copy the file that needs to be imported to the created folder.
- Update
package.json:- Locate the line for
validate:runYourFleetCustomerContract. - Update
--leaseIdwith the required lease ID. - Update
--filewith the relative path of the file.
- Locate the line for
- Save
package.json.
Local Validation
- In a terminal, run
npm run build. - Run the validation script:
npm run validate:runYourFleetCustomerContract. - If validation passes without errors, push the code.
Workflow Validation
- Navigate to Actions in the Import Manager.
- Locate
<Environment> - on-demand-import. - Select the branch created for this import.
- Enter the script name as
validate:runYourFleetCustomerContract. - Leave the Overrides field empty.
Importing the File
- If the validation passes, proceed with the import.
- Navigate to Actions in the Import Manager.
- Locate
<Environment> - on-demand-import. - Select the branch created for this import.
- Enter the script name as
import:runYourFleetCustomerContract. - Enter
--persistin the Overrides field (or--leaseId <leaseId> --persistwhen a specific lease is required).
Importing the File via Cloud Run
Validation scheduler setup
- Go to Cloud Scheduler and select CREATE JOB.
- Configure the Cloud Scheduler with the following parameters:
- Name:
run_your_fleet_customer_contract_import_file_validation - Region: europe-west2
- Frequency:
0 0 31 12 1 - Time Zone: British Summer Time (BST)
- Target Type: HTTP
- URL:
https://import-manager-36r2bu4izq-uc.a.run.app/run-your-fleet-customer-contract - HTTP Method: POST
- Auth Header: Select OIDC Token
- Service Account:
cloud-run-import-customer-contract - Body: Include the following JSON object:
{
"leaseId": "QJKgdjS4I02sEia4yTne",
"leaseCompanyName": "Next Fleet Services",
"persist": "false",
"bucket": "biddirect-2.appspot.com",
"appDirectory": "/usr/src/app/",
"importPath": "imports/fileDrop/",
"importFileDropPath": "imports/fileDrop/",
"importFileName": "ryfCustomerContract.csv",
"email": "mailgun@digitalinnk.com",
"fatalErrorEmailToAddress": "mailgun@digitalinnk.com",
"schema": "RUN_YOUR_FLEET_CUSTOMER_CONTRACT",
"locale": "en_GB"
}
Import scheduler setup
- Go to Cloud Scheduler and select CREATE JOB.
- Configure the Cloud Scheduler with the following parameters:
- Name:
run_your_fleet_customer_contract_import - Region: europe-west2
- Frequency:
0 0 31 12 1 - Time Zone: GMT London
- Target Type: HTTP
- URL:
https://import-manager-36r2bu4izq-uc.a.run.app/run-your-fleet-customer-contract - HTTP Method: POST
- Auth Header: Select OIDC Token
- Service Account:
cloud-run-import-customer-contract - Body: Include the following JSON object:
{
"leaseId": "QJKgdjS4I02sEia4yTne",
"leaseCompanyName": "Next Fleet Services",
"persist": "true",
"bucket": "biddirect-2.appspot.com",
"appDirectory": "/usr/src/app/",
"importPath": "imports/fileDrop/",
"importFileDropPath": "imports/fileDrop/",
"importFileName": "ryfCustomerContract.csv",
"email": "mailgun@digitalinnk.com",
"fatalErrorEmailToAddress": "mailgun@digitalinnk.com",
"schema": "RUN_YOUR_FLEET_CUSTOMER_CONTRACT",
"locale": "en_GB"
}
Preparation
- Bucket Name:
biddirect-2.appspot.com(bucket name may vary across environments). - File Path: Place the file in
imports/fileDropwithin the bucket, using the CSV file named ryfCustomerContract.csv.
Running validation
- Go to Cloud Scheduler.
- Run the
run_your_fleet_customer_contract_import_file_validationjob (job name may vary in different environments).
Running import
- Go to Cloud Scheduler.
- Run the
run_your_fleet_customer_contract_importjob (job name may vary in different environments).
Testing
- After running the import, verify that Run Your Fleet vehicles have been successfully imported by navigating to the ViSN customer platform.
- Go to Vehicle Record and search for the imported vehicle to confirm the import process was successful.
- Where Customer Account Number is provided, verify the vehicle is allocated to the matching sub-customer, or that a new sub-customer has been created.
Status: Pending Approval
Category: Protected
Authored By: Aditya on Sep 1, 2026
Revisions